package com.sss.hloster0703;

public class TestEx05 {// 手工抛出异常

	public static void main(String[] args) {
		System.out.print("NOW   ");
		try {
			System.out.print("is   ");
			throw new NullPointerException("the   ");// 抛出一个空指针异常，指定信息为"the"
			// System.out.print("此句不会被执行！");
		} catch (NullPointerException e) { // 捕获抛出的空指针异常
			System.out.print(e.getMessage());
		}
		System.out.print("time.\n");
	}
}
